/**
 * 安卓白金英雄坛制作组 <br>
 * 文件名：BattleButton.java <br>
 * 创建时间：2013-7-29 下午3:53:16 <br>
 * 所属项目：GmudEX <br>
 *
 * @author 12548 <br>
 */
package lostland.gmud.exv2.battle;

import lostland.gmud.exv2.Assets;
import lostland.gmud.exv2.FontSize;
import lostland.gmud.exv2.Game;
import lostland.gmud.exv2.blgframework.impl.BLGGraphics;
import lostland.gmud.exv2.ui.core.GmudWindow;

/**
 * 类名：BattleButton <br>
 * 说明：
 *
 * @author 12548
 */
public class BattleButton extends GmudWindow {

	public static final int X = 120;
	public static final int Y = 96;

	public static final int dx = -2;
	public static final int dy = 13;

	protected String text[] = {"攻击", "绝招", "吸气", "物品", "蓄力", "逃跑"};

	public int index;

	public BattleButton(int index) {
		super(X + index * 12, Y, 12, 12);
		this.index = index;
	}


	/*
	 * （非 Javadoc）
	 * @see lostland.gmud.exv2.ui.GmudWindow#draw()
	 */
	@Override
	public void draw() {
		BLGGraphics g = (BLGGraphics) Game.getInstance().getGraphics();
		if (bordered) {
			String t = text[index];
// if(index == 4 && Gmud.bs.p2().id == Room.vip_npc[2])
// t = "叫嚣";
			if (index == 5 && Game.getInstance().wulindahui != null) {
				t = "认输";
			}
			g.drawPixmap(Assets.filled, x, y);
			g.drawText(t, x + dx, Y + dy, FontSize.FT_12PX);
		} else {
			g.drawPixmap(Assets.empty, x, y);
		}
	}

}
